package com.formiaomiao.demain.util;

import java.text.SimpleDateFormat;
import java.util.Date;

public class TimeUtils {

    /**
     * 判断白天黑夜
     * @return
     */
    public static boolean getCurrentTime(){
        SimpleDateFormat sdf = new SimpleDateFormat("HH");
        String hour= sdf.format(new Date());
        int k  = Integer.parseInt(hour)  ;
        if ((k>=0 && k<6) ||(k >=18 && k<24)){
            return true;
        } else {
            return false;
        }
    }

}
